<template>
  <scroll-view scroll-y enable-back-to-top>
    <view style="background: #fff">
      <basics-form ref="basicsForm" hiddenMustIcon/>
    </view>
  </scroll-view>
</template>

<script>
import basicsForm from "@/components/basics-form/basics-form.vue";

export default {
  components: {
    basicsForm,
  },
  data() {
    return {
      
    };
  },
  onLoad(options) {
    let data=uni.getStorageSync("evaluate");
    this.initRules(data)
  },
  methods: {
    initRules(data) {
      let disabled=true
      let rules =  [
          {
            title: "最高分",
            key: "maxScore",
            value: data.maxScore||0,disabled
          },
          {
            title: "最低分",
            key: "minScore",
            value: data.minScore||0,disabled
          },
          {
            title: "平均分",
            key: "totalAvgScore",
            value: data.totalAvgScore||0,disabled
          },
          {
            title: "好评数",
            key: "goodNum",
            value: data.goodNum||0,disabled
          },
          {
            title: "差评数",
            key: "badNum",
            value: data.badNum||0,disabled
          },
          {
            title: "评分总次数",
            key: "totalNum",
            value: data.totalNum||0,disabled
          },
          {
            title: "患者人数",
            key: "patientNum",
            value: data.patientNum||0,disabled
          },
          {
            title: "互动量",
            key: "interactNum",
            value: data.interactNum||0,disabled
          },
        ];

      this.$nextTick(() => {
        this.$refs.basicsForm.initForm(rules);
      });
    },
      
  },
};
</script>
<style lang="scss" scoped>
scroll-view {
  background: $back-grey-color;
  height: 100vh;
}
</style>
